package com.headingdata.parameter;

public class MethodDemo1 {

    public static void main(String[] args) {
        int a = 10;
        change(a);
        System.out.println("main:" + a);
        int[] arr = {12,24,16,88};
        System.out.println("mainArr:" + arr[1]);
        changeArr1(arr);
        System.out.println("mainArr1:" + arr[1]);
    }
    public static void change(int a){
        System.out.println("change1:" + a);
        a = 88;
        System.out.println("change2:" + a);
    }

    public static void changeArr1(int[] arr){
        System.out.println("changeArr1:" + arr[1]);
        arr[1] = 288;
        System.out.println("changeArr2:" + arr[1]);
    }
}
